package com.zb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("t_order")
public class Order {

    /**
     * 订单ID (雪花数字ID)
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 租户ID (雪花数字ID)
     */
    @TableField("tenant_id")
    private Long tenantId;

    /**
     * 订单金额 (22,8)
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 订单日期 (精确到时分秒)
     */
    @TableField("order_date")
    private LocalDateTime orderDate;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 订单状态
     */
    @TableField("status")
    private String status;

    /**
     * 订单编号 (外部业务编号)
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 客户ID
     */
    @TableField("customer_id")
    private Long customerId;

    /**
     * 产品数量
     */
    @TableField("product_quantity")
    private Integer productQuantity;

    /**
     * 支付方式
     */
    @TableField("payment_method")
    private String paymentMethod;

    /**
     * 备注信息
     */
    @TableField("remark")
    private String remark;

    /**
     * 逻辑删除标识
     */
    @TableField("deleted")
    private Integer deleted;
}
